3.166 \(\int x^2 (a+b \tanh ^{-1}(\frac{c}{x^2})) \, dx\)

Optimal. Leaf size=61 \[ \frac{1}{3} x^3 \left (a+b \tanh ^{-1}\left (\frac{c}{x^2}\right )\right )-\frac{1}{3} b c^{3/2} \tan ^{-1}\left (\frac{x}{\sqrt{c}}\right )-\frac{1}{3} b c^{3/2} \tanh ^{-1}\left (\frac{x}{\sqrt{c}}\right )+\frac{2 b c x}{3} \]

[Out]

(2*b*c*x)/3 - (b*c^(3/2)*ArcTan[x/Sqrt[c]])/3 + (x^3*(a + b*ArcTanh[c/x^2]))/3 - (b*c^(3/2)*ArcTanh[x/Sqrt[c]]
)/3

________________________________________________________________________________________

Rubi [A]  time = 0.0331548, antiderivative size = 61, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.429, Rules used = {6097, 193, 321, 212, 206, 203} \[ \frac{1}{3} x^3 \left (a+b \tanh ^{-1}\left (\frac{c}{x^2}\right )\right )-\frac{1}{3} b c^{3/2} \tan ^{-1}\left (\frac{x}{\sqrt{c}}\right )-\frac{1}{3} b c^{3/2} \tanh ^{-1}\left (\frac{x}{\sqrt{c}}\right )+\frac{2 b c x}{3} \]

Antiderivative was successfully verified.

[In]

Int[x^2*(a + b*ArcTanh[c/x^2]),x]

[Out]

(2*b*c*x)/3 - (b*c^(3/2)*ArcTan[x/Sqrt[c]])/3 + (x^3*(a + b*ArcTanh[c/x^2]))/3 - (b*c^(3/2)*ArcTanh[x/Sqrt[c]]
)/3

Rule 6097

Int[((a_.) + ArcTanh[(c_.)*(x_)^(n_)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*ArcTa
nh[c*x^n]))/(d*(m + 1)), x] - Dist[(b*c*n)/(d*(m + 1)), Int[(x^(n - 1)*(d*x)^(m + 1))/(1 - c^2*x^(2*n)), x], x
] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1]

Rule 193

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[x^(n*p)*(b + a/x^n)^p, x] /; FreeQ[{a, b}, x] && LtQ[n, 0]
 && IntegerQ[p]

Rule 321

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^n
)^(p + 1))/(b*(m + n*p + 1)), x] - Dist[(a*c^n*(m - n + 1))/(b*(m + n*p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 212

Int[((a_) + (b_.)*(x_)^4)^(-1), x_Symbol] :> With[{r = Numerator[Rt[-(a/b), 2]], s = Denominator[Rt[-(a/b), 2]
]}, Dist[r/(2*a), Int[1/(r - s*x^2), x], x] + Dist[r/(2*a), Int[1/(r + s*x^2), x], x]] /; FreeQ[{a, b}, x] &&
 !GtQ[a/b, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int x^2 \left (a+b \tanh ^{-1}\left (\frac{c}{x^2}\right )\right ) \, dx &=\frac{1}{3} x^3 \left (a+b \tanh ^{-1}\left (\frac{c}{x^2}\right )\right )+\frac{1}{3} (2 b c) \int \frac{1}{1-\frac{c^2}{x^4}} \, dx\\ &=\frac{1}{3} x^3 \left (a+b \tanh ^{-1}\left (\frac{c}{x^2}\right )\right )+\frac{1}{3} (2 b c) \int \frac{x^4}{-c^2+x^4} \, dx\\ &=\frac{2 b c x}{3}+\frac{1}{3} x^3 \left (a+b \tanh ^{-1}\left (\frac{c}{x^2}\right )\right )+\frac{1}{3} \left (2 b c^3\right ) \int \frac{1}{-c^2+x^4} \, dx\\ &=\frac{2 b c x}{3}+\frac{1}{3} x^3 \left (a+b \tanh ^{-1}\left (\frac{c}{x^2}\right )\right )-\frac{1}{3} \left (b c^2\right ) \int \frac{1}{c-x^2} \, dx-\frac{1}{3} \left (b c^2\right ) \int \frac{1}{c+x^2} \, dx\\ &=\frac{2 b c x}{3}-\frac{1}{3} b c^{3/2} \tan ^{-1}\left (\frac{x}{\sqrt{c}}\right )+\frac{1}{3} x^3 \left (a+b \tanh ^{-1}\left (\frac{c}{x^2}\right )\right )-\frac{1}{3} b c^{3/2} \tanh ^{-1}\left (\frac{x}{\sqrt{c}}\right )\\ \end{align*}

Mathematica [A]  time = 0.0183367, size = 86, normalized size = 1.41 \[ \frac{a x^3}{3}+\frac{1}{6} b c^{3/2} \log \left (\sqrt{c}-x\right )-\frac{1}{6} b c^{3/2} \log \left (\sqrt{c}+x\right )-\frac{1}{3} b c^{3/2} \tan ^{-1}\left (\frac{x}{\sqrt{c}}\right )+\frac{1}{3} b x^3 \tanh ^{-1}\left (\frac{c}{x^2}\right )+\frac{2 b c x}{3} \]

Antiderivative was successfully verified.

[In]

Integrate[x^2*(a + b*ArcTanh[c/x^2]),x]

[Out]

(2*b*c*x)/3 + (a*x^3)/3 - (b*c^(3/2)*ArcTan[x/Sqrt[c]])/3 + (b*x^3*ArcTanh[c/x^2])/3 + (b*c^(3/2)*Log[Sqrt[c]
- x])/6 - (b*c^(3/2)*Log[Sqrt[c] + x])/6

________________________________________________________________________________________

Maple [A]  time = 0.008, size = 51, normalized size = 0.8 \begin{align*}{\frac{{x}^{3}a}{3}}+{\frac{b{x}^{3}}{3}{\it Artanh} \left ({\frac{c}{{x}^{2}}} \right ) }-{\frac{b}{3}{c}^{{\frac{3}{2}}}\arctan \left ({x{\frac{1}{\sqrt{c}}}} \right ) }+{\frac{2\,xbc}{3}}-{\frac{b}{3}{c}^{{\frac{3}{2}}}{\it Artanh} \left ({\frac{1}{x}\sqrt{c}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(a+b*arctanh(c/x^2)),x)

[Out]

1/3*x^3*a+1/3*b*x^3*arctanh(c/x^2)-1/3*b*c^(3/2)*arctan(x/c^(1/2))+2/3*x*b*c-1/3*b*c^(3/2)*arctanh(1/x*c^(1/2)
)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*arctanh(c/x^2)),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.77425, size = 421, normalized size = 6.9 \begin{align*} \left [\frac{1}{6} \, b x^{3} \log \left (\frac{x^{2} + c}{x^{2} - c}\right ) + \frac{1}{3} \, a x^{3} - \frac{1}{3} \, b c^{\frac{3}{2}} \arctan \left (\frac{x}{\sqrt{c}}\right ) + \frac{1}{6} \, b c^{\frac{3}{2}} \log \left (\frac{x^{2} - 2 \, \sqrt{c} x + c}{x^{2} - c}\right ) + \frac{2}{3} \, b c x, \frac{1}{6} \, b x^{3} \log \left (\frac{x^{2} + c}{x^{2} - c}\right ) + \frac{1}{3} \, a x^{3} + \frac{1}{3} \, b \sqrt{-c} c \arctan \left (\frac{\sqrt{-c} x}{c}\right ) + \frac{1}{6} \, b \sqrt{-c} c \log \left (\frac{x^{2} - 2 \, \sqrt{-c} x - c}{x^{2} + c}\right ) + \frac{2}{3} \, b c x\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*arctanh(c/x^2)),x, algorithm="fricas")

[Out]

[1/6*b*x^3*log((x^2 + c)/(x^2 - c)) + 1/3*a*x^3 - 1/3*b*c^(3/2)*arctan(x/sqrt(c)) + 1/6*b*c^(3/2)*log((x^2 - 2
*sqrt(c)*x + c)/(x^2 - c)) + 2/3*b*c*x, 1/6*b*x^3*log((x^2 + c)/(x^2 - c)) + 1/3*a*x^3 + 1/3*b*sqrt(-c)*c*arct
an(sqrt(-c)*x/c) + 1/6*b*sqrt(-c)*c*log((x^2 - 2*sqrt(-c)*x - c)/(x^2 + c)) + 2/3*b*c*x]

________________________________________________________________________________________

Sympy [A]  time = 22.2281, size = 624, normalized size = 10.23 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(a+b*atanh(c/x**2)),x)

[Out]

Piecewise((a*x**3/3, Eq(c, 0)), (x**3*(a - oo*b)/3, Eq(c, -x**2)), (x**3*(a + oo*b)/3, Eq(c, x**2)), (-2*a*c**
(29/2)*x**3/(-6*c**(29/2) + 6*c**(25/2)*x**4) + 2*a*c**(25/2)*x**7/(-6*c**(29/2) + 6*c**(25/2)*x**4) - 4*b*c**
(31/2)*x/(-6*c**(29/2) + 6*c**(25/2)*x**4) - 2*b*c**(29/2)*x**3*atanh(c/x**2)/(-6*c**(29/2) + 6*c**(25/2)*x**4
) + 4*b*c**(27/2)*x**5/(-6*c**(29/2) + 6*c**(25/2)*x**4) + 2*b*c**(25/2)*x**7*atanh(c/x**2)/(-6*c**(29/2) + 6*
c**(25/2)*x**4) - 2*b*c**16*log(-sqrt(c) + x)/(-6*c**(29/2) + 6*c**(25/2)*x**4) + b*c**16*log(-I*sqrt(c) + x)/
(-6*c**(29/2) + 6*c**(25/2)*x**4) - I*b*c**16*log(-I*sqrt(c) + x)/(-6*c**(29/2) + 6*c**(25/2)*x**4) + b*c**16*
log(I*sqrt(c) + x)/(-6*c**(29/2) + 6*c**(25/2)*x**4) + I*b*c**16*log(I*sqrt(c) + x)/(-6*c**(29/2) + 6*c**(25/2
)*x**4) - 2*b*c**16*atanh(c/x**2)/(-6*c**(29/2) + 6*c**(25/2)*x**4) + 2*b*c**14*x**4*log(-sqrt(c) + x)/(-6*c**
(29/2) + 6*c**(25/2)*x**4) - b*c**14*x**4*log(-I*sqrt(c) + x)/(-6*c**(29/2) + 6*c**(25/2)*x**4) + I*b*c**14*x*
*4*log(-I*sqrt(c) + x)/(-6*c**(29/2) + 6*c**(25/2)*x**4) - b*c**14*x**4*log(I*sqrt(c) + x)/(-6*c**(29/2) + 6*c
**(25/2)*x**4) - I*b*c**14*x**4*log(I*sqrt(c) + x)/(-6*c**(29/2) + 6*c**(25/2)*x**4) + 2*b*c**14*x**4*atanh(c/
x**2)/(-6*c**(29/2) + 6*c**(25/2)*x**4), True))

________________________________________________________________________________________

Giac [A]  time = 1.25818, size = 93, normalized size = 1.52 \begin{align*} \frac{1}{3} \, b c^{3}{\left (\frac{\arctan \left (\frac{x}{\sqrt{-c}}\right )}{\sqrt{-c} c} - \frac{\arctan \left (\frac{x}{\sqrt{c}}\right )}{c^{\frac{3}{2}}}\right )} + \frac{1}{6} \, b x^{3} \log \left (\frac{x^{2} + c}{x^{2} - c}\right ) + \frac{1}{3} \, a x^{3} + \frac{2}{3} \, b c x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*arctanh(c/x^2)),x, algorithm="giac")

[Out]

1/3*b*c^3*(arctan(x/sqrt(-c))/(sqrt(-c)*c) - arctan(x/sqrt(c))/c^(3/2)) + 1/6*b*x^3*log((x^2 + c)/(x^2 - c)) +
 1/3*a*x^3 + 2/3*b*c*x